﻿using System;

namespace Tuxedo.Compile
{
	internal abstract class Constant : Expression
	{
		public Constant() : base() { }

		public virtual bool IsZero { get { return false; } }

		public virtual Expression Add(Constant other) { throw new Exception("Addition not valid for these types."); }
		public virtual Expression Subtract(Constant other) { throw new Exception("Subtraction not valid for these types."); }
		public virtual Expression Multiply(Constant other) { throw new Exception("Multiplication not valid for these types."); }
		public virtual Expression Divide(Constant other) { throw new Exception("Division not valid for these types."); }
		public virtual Expression Modulo(Constant other) { throw new Exception("Modulo not valid for these types."); }
		public virtual Expression Negative() { throw new Exception("Negative sign not valid for this type."); }

		public abstract object ObjectValue { get; }
	}
}
